﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
namespace University.Workshop.Business
{
    public static class MailHelper
    {
        public static void SendMailMessage(string from, string to, string subject, string body)
        {


            if (string.IsNullOrEmpty(from) || string.IsNullOrEmpty(to) || string.IsNullOrEmpty(subject) || string.IsNullOrEmpty(body))
                body = "";
            /*
            MailMessage mMailMessage = new MailMessage();
            mMailMessage.From = new MailAddress(from);
            mMailMessage.To.Add(new MailAddress(to));
            mMailMessage.Subject = subject;
            mMailMessage.Body = body;
            
            //set the format of the mail massage body as HTML
            mMailMessage.IsBodyHtml = true;
            mMailMessage.Priority = MailPriority.Normal;
                //Instantiate a new instance of SmtpClient
            SmtpClient mSmtpClient = new SmtpClient("smtp.gmail.com", 587);
            System.Net.NetworkCredential cred = new System.Net.NetworkCredential("user.loquesea@gmail.com", "loqueseaUser");
                //mSmtpClient.Host = "smtp.yourdomain.com";
                //send the mail message
            mSmtpClient.EnableSsl = true;
            mSmtpClient.UseDefaultCredentials = false;
            mSmtpClient.Credentials = cred;
            mSmtpClient.Send(mMailMessage);
            */
            
        }
    }
}
